<?php
require_once('onetomany_model.php');

/* extends the one to many model to allow for deleting of physical files on disc */
class RelatedFiles_model extends OneToMany_model{
	var $file_location_field = 'image_path';
	
	function RelatedFiles_model(){
		parent::OneToMany_model();
	}
	
	function deleteItems( $ids ){
		parent::deleteItems($ids);
	}
	
	function getFileLocationField(){
		return $this->file_location_field;
	}
	
	function setFileLocationField($field){
		if( $this->many_table && $this->db->field_exists($field, $this->many_table)){
			$this->file_location_field = $field;
		}
	}
}

?>